package com.passion.context;

import com.passion.common.login.LoginService;
import com.passion.mq.rabbitmq.queue1.UserOperationQueueProducer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 类描述：业务服务上下文
 *
 * @author ZhuYin
 * @since 2024年12月26日
 */
@Component
public class BizServiceBeanContext {

    public static UserContext userContext;
    @Resource
    public void setUserContext(UserContext userContext) {
        BizServiceBeanContext.userContext = userContext;
    }

    public static LoginService loginService;
    @Resource
    public void setLoginService(LoginService loginService) {
        BizServiceBeanContext.loginService = loginService;
    }

    public static UserOperationQueueProducer businessMqSender;
    @Autowired(required = false)
    public void setBusinessMqSender(UserOperationQueueProducer businessMqSender) {
        BizServiceBeanContext.businessMqSender = businessMqSender;
    }

}
